//
//  ClientViewController.m
//  TriumphInTheSkiesAPP
//
//  Created by 要帅气的生活 on 15/11/3.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "ClientViewController.h"
#import "Size.h"
#import "ToolUtil.h"
#import "EaseMob.h"
#import "IEMMessageBody.h"
#import "PedometerViewController.h"
@interface ClientViewController ()

@end

@implementation ClientViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIButton * photoButton = [UIButton buttonWithType:UIButtonTypeCustom];
    photoButton.frame = CGRectMake(0, 100, WindowWidth, 50);
    photoButton.backgroundColor = [UIColor blackColor];
    
    [photoButton addTarget:self action:@selector(doLineButtonClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:photoButton];
    
    UIButton *pedometerButton = [UIButton buttonWithType:UIButtonTypeSystem];
    pedometerButton.frame = CGRectMake(0, 200, WindowWidth, 50);
    pedometerButton.backgroundColor = [UIColor cyanColor];
    [pedometerButton setTitle:@"计步器" forState:UIControlStateNormal];
    [pedometerButton addTarget:self action:@selector(pressButton) forControlEvents:UIControlEventTouchUpInside];
    
}

- (void)pressButton{
    
    [self.navigationController pushViewController:[[PedometerViewController alloc] init] animated:YES];
    
}

- (void)doLineButtonClick:(UIButton *)btn
{
    [ToolUtil share:@"gaa" content:@"aa" url:@"k" image:@"gg" view:self.view control:self];
    
}
- (void)chat
{
//    EMChatText * txtChat = [[EMChatText alloc] initWithText:@"发消息"];
//    EMTextMessageBody * body = [[EMTextMessageBody alloc] initWithChatObject:txtChat];
//    
//    //生成message
//    EMMessage * message = [[EMMessage alloc] initWithReceiver:@"lll" bodies:@[body]];
//    message.messageType = eMessageTypeChat;
//    
//    EMConversation * conveersation = [[EaseMob sharedInstance].chatManager conversationForChatter:@"lll" conversationType:eConversationTypeChat];
//    [[EaseMob sharedInstance].chatManager removeConversationByChatter:@"8001" deleteMessages:YES append2Chat:YES];
//    [[EaseMob sharedInstance].chatManager sendMessage:message progress:nil error:nil];
    
    
}
@end
